Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember build should ignore backup files #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scribu
Copy link

@scribu scribu commented Nov 21, 2013

When editing a file in Vim, it creates backup files which end with a ~.

ember build picks up these files, instead of only reading files that end with .js:

Error: Parsing file /app/js/index.js: Line 10: Unexpected token ~

/Users/User/git/ember-tools/src/commands/build.js:104
    if (error && !env.watch) throw new Error(error);
                                   ^
Error: Error: Command failed: Error: Parsing file /app/js/index.js: Line 10: Unexpected token ~

    at /Users/User/git/ember-tools/src/commands/build.js:104:36
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

The generated index.js file looks like this:

// This file is auto-generated by `ember build`.
// You should not modify it.

var App = window.App = require('./config/app');
require('./templates');


App.AuthorizeIndexController = require('./controllers/authorize_index_controller');
App.AuthorizeIndexController.js~ = require('./controllers/authorize_index_controller.js~');

require('./config/routes');

module.exports = App;

The attached patch fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant